class BoxTester < Sketch3D
  def container
    super do
      block do
        ambientLight(0.0, 0.0, 0.3, -2.0, -20.0, 8.0)
        pointLight(0.0, 0.0, 1.0, 10.0, -4.0, 4.0)
        pointLight(0.0, 0.3, 0.5, 1.0, 8.0, 2.0)
        background 0
        noStroke
      end
      group do
        block do
          @rx = pi_pulse(5000)
          @rz = pi_pulse(2000)
        end
        group :stroke => Green do
          box(:sx => 0.4, :sz => 0.4, :sy => 4, :fill => White, :stroke => Black)
          box(:ty => 0.6, :sy => 1.0)  do
            block do
              @ry = pi_pulse(200)
              @fill = Color.new [sin_pulse(9000).abs, sin_pulse(440).abs, sin_pulse(420).abs, 1]
            end
          end
          box(:ty => -0.6, :sy => 1.0) do
            block do
              @ry = pi_pulse(250) * -1
              @fill = Color.new [sin_pulse(10000).abs, sin_pulse(420).abs, sin_pulse(440).abs, 1]
            end
          end
        end
      end
    end
  end
end


